<template>
	<view class="flex align-stretch">
		<view class="flex align-center justify-center position-relative" style="width: 145rpx;height: 135rpx;">
			<free-all-image :src="item.userImg" :size="92" :type="rounded"></free-all-image>
			<text class="bg-danger text-white rounded-circle font-sm text-center position-absolute"
				style="padding-left: 14rpx;padding-right: 14rpx;padding-bottom: 6rpx;padding-top: 6rpx;right: 15rpx;top: 15rpx;"
				v-if="(item.noReadNum!=null&&item.noReadNum>0)?true:false">{{item.noReadNum}}</text>
		</view>
		<view class="flex flex-column border-bottom flex-1 py-3 pr-3 border-light-secondary">
			<view class="flex justify-between mb-1">
				<text class="font-md">{{item.nickName}}</text>
				<text class="font-sm text-light-muted">{{item.updateTime|formatTime}}</text>
			</view>
			<text class="font text-ellipsis text-light-muted">{{item.content}}</text>
		</view>
	</view>
</template>

<script>
	import freeAllImage from '@/components/free-ui/free-all-image.vue'
	import $Time from '@/common/free-lib/time.js'
	export default {
		components: {
			freeAllImage
		},
		props: {
			item: Object,
			index: Number
		},
		filters: {
			formatTime(value) {
				return $Time.gettime(value);
			}
		}
	}
</script>

<style>
</style>
